import request from '@/utils/_request'

// 查询字典数据列表
export function listData(data) {
    return request({
        url: '/admin/system/dict/data/list',
        method: 'get',
        params: data
    })
}
//新增字典数据
export function addData(data){
    return request({
        url:'/admin/system/dict/data',
        method:'post',
        data:data
    })
}
//查询字典数据详情
export function getData(dictCode){
    return request({
        url:'/admin/system/dict/data/'+dictCode,
        method:'GET'
    })
}
//修改字典数据
export function updateData(data){
    return request({
        url:'/admin/system/dict/data',
        method:'PUT',
        data:data
    })
}
//删除字典数据
export function delData(dictCodes){
    return request({
        url:'/admin/system/dict/data/'+dictCodes,
        method:'DELETE'
    })
}
//根据字典类型查询字典信息
export function getDicts(dictType){
    return request({
        url:'/admin/system/dict/data/type/'+dictType,
        method:'GET'
    })
}